<?php

echo "result: " . $result;
$attach = Doctrine::getTable('attente')->find(516);
$dateFormatter = new sfDateFormat($culture); 
$charset = sfConfig::get('sf_charset');
echo $dateFormatter->format($attach->debut,'yyyy-MM-dd', null, $charset).'<br />';
$dateArr = explode('-', $dateFormatter->format($attach->debut,'yyyy-MM-dd', null, $charset));
print_r($dateArr).'<br />';
$debut = mktime (0, 0, 0, (int)$dateArr[1], (int)$dateArr[2], (int)$dateArr[0]);
echo date('Y-m-d',$debut).'<br />';
$funcs = new erdfFuncs;
$this->fin = date('Y-m-d');
$dateArr = explode('-',date('Y-m-d'));
$today = mktime (0, 0, 0, (int)$dateArr[1], (int)$dateArr[2], (int)$dateArr[0]);
$dia = 1;
$mes = 9;
$anio = 2010;
$debut = mktime (0, 0, 0, $mes, $dia, $anio);
$diffArray = $funcs->dateDiff($debut, $today);
echo "Diferencia entre: " . date('d/m/Y', $debut) . ' y ' . date('d/m/Y', $today).'<br />'; 
print_r ($diffArray);